import {Component} from "@vue/runtime-core";
import {App} from "vue";
enum InsertType {
    append,
    prepend,
}
export enum Platform {
    TaoBao = 'TaoBao',
    Sycm = 'Sycm',
    WanXiangTai = 'WanXiangTai',
    Tmall = 'Tmall',
    Jd = 'Jd',
    Pdd = 'Pdd',
    Qiniu='Qiniu'
}
export enum PlatformAuth {
    SYCM_ANALYSIS = 'SYCM_ANALYSIS',
    SYCM_REVERT = 'SYCM_REVERT',
    WXT_TOOL = 'WXT_TOOL',
}
interface RenderOption {
    // 匹配的URL
    url: string,
    // 匹配的容器选择器
    containerSelector: string,
    // 渲染判断条件 默认为true 为false时不渲染
    condition?: () => boolean,
    // VUE 组件
    component: Component,
    // 插入容器方式
    insertType: InsertType,
    // 内部容器的样式
    style?: any,
    interceptions?: ReqInit[],
    // 自定义设置App
    customApp?: (app: App) => App,  // dom.append(container)
    // 对于一个未知相同组件的自定义key设置
    key?: string | number,
    // 不检测渲染开关
    noCheckSwitch?: boolean,
    platform: Platform,
    platformAuth?: PlatformAuth,
}

export default RenderOption;
export {InsertType};
